<template>
	<view class="bottom-btn-center" :style="{height:['4'].includes(btnIndex)?'unset':'190upx'}">
		<view class="bottom-btn-box" v-if="btnIndex === '1'" @click="submitClick" :class="(positon?'positon ':'')+'type'+btnType">
			<view class="button-box all-center f-s-30 color-fff" :style="disabled?{background:'#adc7ff'}:{}">
				<slot></slot>
			</view>
		</view>
		<view class="bottom-btn-box" v-if="btnIndex === '3'" @click="submitClick" :class="(positon?'positon ':'')+'type'+btnType">
			<view class="button-box all-center f-s-30 color-fff" style="background: #EE8300;">
				<slot></slot>
			</view>
		</view>
		<view class="bottom-btn-box2" v-if="btnIndex === '2'" @click="submitClick" :class="(positon?'positon ':'')+'type3'">
			<view class="button-box all-center f-s-30 color-fff">
				<slot></slot>
			</view>
		</view>

		<view class="bottom-btn-box4" v-if="btnIndex === '4'" @click="submitClick" :class="(positon?'positon ':'')+'type1'" style="height: unset;">
			<view class="button-box all-center f-s-30 color-fff" style="background-image: linear-gradient(to right, #FBB10B 0%, #FB3A0B 100%);">
				<slot></slot>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"bottomBtn",
		props:{
			positon:{
				type:Boolean,
				default(){
					return true
				}
			},
			btnType:{
				type:String,
				default:"1"
			},
			btnIndex:{
				type:String,
				default:"1"
			},
			disabled:{
				type:Boolean,
				default(){
					return false
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			submitClick(){
				this.$emit("click",'1')
			}
		}
	} 
</script>

<style lang="scss" scoped>
	.positon{
		position: fixed;
	}
	.type1{
		width: 750upx;
		height: 160upx;
	}
	.type3{
		height: 160upx;
	}
	.type2{
		width: 620upx;
		height: 96upx;
	}
	.bottom-btn-center{
		height: 190upx;
		.bottom-btn-box2{
			padding-bottom: 48upx;
			padding-top: 16upx;
			bottom: 0;
			left: 0;
			z-index: 3;
			.button-box{
				width: 100%;
				height: 96upx;
				background: #2567F3;
				border-radius: 128px;
			}
		}
		.bottom-btn-box{
			padding-bottom: 48upx;
			padding-top: 16upx;
			padding-right: 24upx;
			padding-left: 24upx;
			background: #FFFFFF;
			bottom: 0;
			left: 0;
			z-index: 3;
			.button-box{
				width: 100%;
				height: 96upx;
				background: #2567F3;
				border-radius: 128px;
			}
		}
		.bottom-btn-box4{
			padding-bottom: 16upx;
			padding-top: 16upx;
			padding-right: 24upx;
			padding-left: 24upx;
			background: #FFFFFF;
			bottom: 0;
			left: 0;
			z-index: 3;
			.button-box{
				width: 100%;
				height: 96upx;
				background: #2567F3;
				border-radius: 128px;
			}
		}
	}
</style>